<?php
/**
 *  Ensures this file is being included by a parent file
 */
defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');

/**
 * Install function
 */
function com_install() {
    global $database, $mosConfig_absolute_path;

/*
	$database->setQuery ('CREATE TABLE IF NOT EXISTS `#__jts` '
	.'( `id` int(11) NOT NULL auto_increment, '
	.'`jtsver` varchar(6) default NULL, '
	.'`lastrate` varchar(3) default NULL, '
	.'`lastrun` varchar(55) default NULL, '
    .' PRIMARY KEY (`id`) )');
    $database->query();

    $database->setQuery('INSERT INTO `#__jts` VALUES (1,1.0.0A,0,None)');
    $database->query();
*/

    // update the menus
    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/jts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_link='.$database->Quote('option=com_jts&task=jts')
        .' WHERE link = '.$database->Quote('option=com_jts'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/jts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsws'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/sysinfo.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsdia'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsdpa'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsfpa'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsico'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsimo'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/query.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsima'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/maindb.png')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsdbo'));
    $database->query();

    $database->setQuery('UPDATE `#__components`'
        .' SET admin_menu_img='.$database->Quote('../administrator/components/com_jts/images/jts_icon.gif')
        .' WHERE admin_menu_link = '.$database->Quote('option=com_jts&task=jtsabout'));
    $database->query();


} // com_install()
